import s from "./index.module.less";
import { useParams } from 'react-router-dom';

function App(): JSX.Element {
  const params: any = useParams();

  const obj = {
    gom: 'https://3122.cn/tools/help/%E6%96%B0GOM/?3122.cn',
    esp: 'https://3122.cn/tools/help/ESP-B/?3122.cn',
  }
  
  return (
    <div className={s.iframe}>
      <a href={obj[params.type]} target="_blank" rel="noopener noreferrer">在浏览器中打开文档</a>
      <iframe src={obj[params.type]}></iframe>
    </div>
  )
}

export default App
